#include "SNCascadeParams.h"
//------------------------------------------------------------------

SNCascadeParams::SNCascadeParams()
{
}

SNCascadeParams::SNCascadeParams(int stage_type, int feature_type)
{

}

//------------------------------------------------------------------

SNCascadeParams::~SNCascadeParams()
{
}
//------------------------------------------------------------------
bool SNCascadeParams::ScanAttr(const QString prm_name, const QString val)
{
	bool res = true;
	if (!prm_name.compare("-stageType"))
	{
		for (int i = 0; i < (int)(sizeof(SNCascadeStageTypes) / sizeof(SNCascadeStageTypes[0])); i++)
		{
			if (!val.compare(SNCascadeStageTypes[i]))
				StageType = i;
		}
		
	}
	else 
	if (!prm_name.compare("-featureType"))
	{
		for (int i = 0; i < (int)(sizeof(SNCascadeFeatureTypes) / sizeof(SNCascadeFeatureTypes[0])); i++)
		{
			if (!val.compare(SNCascadeFeatureTypes[i]))
			{
				FeatureType = i;
			}
		}
		
	}
	else 
	if (!prm_name.compare("-w"))
	{
		WinSize.width = val.toInt();
	}
	else 
	if (!prm_name.compare("-h"))
	{
		WinSize.height = val.toInt();
	}
	else
	{
		res = false;
	}
	
	return res;
}
//------------------------------------------------------------------